package com.decent.manager.system.dao.provider;

import com.decent.manager.system.dto.SystemClassifyDTO;

import java.util.Map;

/**
 * @author: decent Gjh
 * @date: 2022/10/26/9:51
 * @description:
 */

public class SystemClassifyDaoProvider {

    /**
     * 列表查询
     * @param params 查询条件
     * @return 结果
     */
    public String list(Map<String, SystemClassifyDTO> params) {
        SystemClassifyDTO dto = params.get("classify");
        StringBuilder sql = new StringBuilder(128);
        sql.append("select * from common_classify ");
        if (dto.getAvailable()!=null && dto.getAvailable()) {
            sql.append(" where sort > 0 ");
        }
        sql.append(" order by sort asc ");
        return sql.toString();
    }

}
